#ifndef BUFFER
#define BUFFER

#include "../define.h"

namespace sleek
{
    namespace core
    {
        namespace math
        {
            template<typename T> struct buffer
            {
                buffer(core::u32 i) : size(i)
                {
                    pitch = new T[size];
                }
                ~buffer()
                {
                    delete [] pitch;
                }

                core::u32 getSizeInBytes()
                {
                    return size*sizeof(T);
                }
                core::u32 getSize()
                {
                    return size;
                }
                core::u32 size;
                T *pitch;
            };

            typedef buffer<core::u8>  bufferc;
            typedef buffer<core::f32> bufferf;
            typedef buffer<core::u32> bufferu;
            typedef buffer<core::s32> buffers;
        }
    }
}

#endif
